ThinkPHP5


think\exception\Handle
library\think\exception\Handle.php at line 22

Class Handle

Handle

public class Handle


Method Summary
void

report(\Exception exception)

Report or log an exception.

protected void

isIgnoreReport(Exception exception)

Response

render(\Exception e)

Render an exception into an HTTP response.

void

renderForConsole(Output output, Exception e)

protected Response

renderHttpException(HttpException e)

protected Response

convertExceptionToResponse(Exception exception)

protected integer

getCode(\Exception exception)

获取错误编码 ErrorException则使用错误级别作为错误编码

protected string

getMessage(\Exception exception)

获取错误信息 ErrorException则使用错误级别作为错误编码

protected array

getSourceCode(\Exception exception)

获取出错文件内容 获取错误的前9行和后9行

protected array

getExtendData(\Exception exception)

获取异常扩展信息 用于非调试模式html返回类型显示

Method Detail

library\think\exception\Handle.php at line 33

report

public void report(\Exception exception)

Report or log an exception.


library\think\exception\Handle.php at line 57

isIgnoreReport

protected void isIgnoreReport(Exception exception)

library\think\exception\Handle.php at line 73

render

public Response render(\Exception e)

Render an exception into an HTTP response.


library\think\exception\Handle.php at line 86

renderForConsole

public void renderForConsole(Output output, Exception e)


library\think\exception\Handle.php at line 98

renderHttpException

protected Response renderHttpException(HttpException e)


library\think\exception\Handle.php at line 113

convertExceptionToResponse

protected Response convertExceptionToResponse(Exception exception)


library\think\exception\Handle.php at line 183

getCode

protected integer getCode(\Exception exception)

获取错误编码 ErrorException则使用错误级别作为错误编码

Returns:
错误编码

library\think\exception\Handle.php at line 198

getMessage

protected string getMessage(\Exception exception)

获取错误信息 ErrorException则使用错误级别作为错误编码

Returns:
错误信息

library\think\exception\Handle.php at line 223

getSourceCode

protected array getSourceCode(\Exception exception)

获取出错文件内容 获取错误的前9行和后9行

Returns:
错误文件内容

library\think\exception\Handle.php at line 247

getExtendData

protected array getExtendData(\Exception exception)

获取异常扩展信息 用于非调试模式html返回类型显示

Returns:
异常类定义的扩展数据

ThinkPHP5